const { http } = uni.$u

// 获取类别列表
export const getCategoryList = (data) => {
	return http.get('/api/category/findAll', {params: data})
}

// 新增类别
export const addCategory = (data, config) => {
	return http.post(`/api/category/add/${data.id}`, data, config)
}

// 编辑类别
export const updateCategory = (data, config)=> {
	return http.put(`/api/category/update/${data.id}`, data, config)
}
